package com.sky.service;

import com.sky.dto.*;
import com.sky.result.PageResult;
import com.sky.vo.*;
import org.springframework.data.domain.jaxb.SpringDataJaxb;
import org.springframework.stereotype.Service;

@Service
public interface OrderService {
    OrderSubmitVO submit(OrdersSubmitDTO ordersDTO);

    PageResult conditionSearch(OrdersPageQueryDTO ordersPageQueryDTO);

    OrderSearchVO getById(Long id);

    OrderStatisticsVO statistics();

    void complete(Long id);

    void delivery(Long id);

    void confirm(OrdersConfirmDTO ordersConfirmDTO);

    void cancel(OrdersCancelDTO ordersCancelDTO);

    void rejection(OrdersRejectionDTO ordersRejectionDTO);

    PageResult conditionSearchWithUserId(OrdersPageQueryDTO ordersPageQueryDTO);

    void repetion(Long id);

    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);
}
